import { configureStore } from "@reduxjs/toolkit";
import { useDispatch } from "react-redux";
// 管理员
import auth from "./modules/auth";
// 数据字典
import cmn from "./modules/cmn";
// 医院模块
import hosp from "./modules/hosp";
// 公共模块
import common from "./modules/common";
// 三级菜单
import category from "./modules/category"
const store = configureStore({
    reducer:{
        auth,
        cmn,
        hosp,
        common,
        category
    }
})
export const appDispatch = store.dispatch;
export type Tdispatch = typeof store.dispatch;
// 自定义hooks,提供dispatch
export const useAppDispatch = ()=> useDispatch<Tdispatch>();
export default store;